<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- qrgba64.qdoc -->
  <title>QRgba64 Class | Qt GUI 5.14.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.14</a></td><td ><a href="qtgui-index.html">Qt GUI</a></td><td ><a href="qtgui-module.html">C++ Classes</a></td><td >QRgba64</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtgui-index.html">Qt 5.14.2 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QRgba64 Class</h1>
<!-- $$$QRgba64-brief -->
<p>The QRgba64 struct contains a 64-bit RGB color. <a href="#details">More...</a></p>
<!-- @@@QRgba64 -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QRgba64&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += gui</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.6</td></tr></table></div><p>This class was introduced in Qt 5.6.</p>
<ul>
<li><a href="qrgba64-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> quint8 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#alpha8">alpha8</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint16 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#alpha">alpha</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint8 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#blue8">blue8</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint16 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#blue">blue</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint8 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#green8">green8</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint16 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#green">green</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#isOpaque">isOpaque</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#isTransparent">isTransparent</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#premultiplied">premultiplied</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint8 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#red8">red8</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint16 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#red">red</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#setAlpha">setAlpha</a></b>(quint16 <i>alpha</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#setBlue">setBlue</a></b>(quint16 <i>blue</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#setGreen">setGreen</a></b>(quint16 <i>green</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#setRed">setRed</a></b>(quint16 <i>red</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#toArgb32">toArgb32</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> ushort </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#toRgb16">toRgb16</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#unpremultiplied">unpremultiplied</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> quint64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#operator-quint64">operator quint64</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#operator-eq">operator=</a></b>(quint64 <i>rgba</i>)</td></tr>
</table></div>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#fromArgb32">fromArgb32</a></b>(uint <i>rgb</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#fromRgba64">fromRgba64</a></b>(quint64 <i>c</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#fromRgba64-1">fromRgba64</a></b>(quint16 <i>r</i>, quint16 <i>g</i>, quint16 <i>b</i>, quint16 <i>a</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRgba64 </td><td class="memItemRight bottomAlign"><b><a href="qrgba64.html#fromRgba">fromRgba</a></b>(quint8 <i>red</i>, quint8 <i>green</i>, quint8 <i>blue</i>, quint8 <i>alpha</i>)</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QRgba64-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>QRgba64 is a 64-bit data-structure containing four 16-bit color channels: Red, green, blue and alpha.</p>
<p>QRgba64 can be used as a replacement for <a href="qcolor.html#QRgb-typedef">QRgb</a> when higher precision is needed. In particular a premultiplied QRgba64 can operate on unpremultiplied <a href="qcolor.html#QRgb-typedef">QRgb</a> without loss of precision except for alpha 0.</p>
</div>
<p><b>See also </b><a href="qcolor.html#QRgb-typedef">QRgb</a> and <a href="qcolor.html">QColor</a>.</p>
<!-- @@@QRgba64 -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$alpha8[overload1]$$$alpha8 -->
<h3 class="fn" id="alpha8"><a name="alpha8"></a><span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> QRgba64::<span class="name">alpha8</span>() const</h3>
<p>Returns the alpha channel as an 8-bit.</p>
<!-- @@@alpha8 -->
<!-- $$$alpha[overload1]$$$alpha -->
<h3 class="fn" id="alpha"><a name="alpha"></a><span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> QRgba64::<span class="name">alpha</span>() const</h3>
<p>Returns the 16-bit alpha channel.</p>
<p><b>See also </b><a href="qrgba64.html#setAlpha">setAlpha</a>().</p>
<!-- @@@alpha -->
<!-- $$$blue8[overload1]$$$blue8 -->
<h3 class="fn" id="blue8"><a name="blue8"></a><span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> QRgba64::<span class="name">blue8</span>() const</h3>
<p>Returns the blue color component as an 8-bit.</p>
<!-- @@@blue8 -->
<!-- $$$blue[overload1]$$$blue -->
<h3 class="fn" id="blue"><a name="blue"></a><span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> QRgba64::<span class="name">blue</span>() const</h3>
<p>Returns the 16-bit blue color component.</p>
<p><b>See also </b><a href="qrgba64.html#setBlue">setBlue</a>().</p>
<!-- @@@blue -->
<!-- $$$fromArgb32[overload1]$$$fromArgb32uint -->
<h3 class="fn" id="fromArgb32"><a name="fromArgb32"></a><code>[static] </code><span class="type">QRgba64</span> QRgba64::<span class="name">fromArgb32</span>(<span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> <i>rgb</i>)</h3>
<p>Constructs a <a href="qrgba64.html">QRgba64</a> value from the 32bit ARGB value <i>rgb</i>.</p>
<p><b>See also </b><a href="qrgba64.html#fromRgba">fromRgba</a>().</p>
<!-- @@@fromArgb32 -->
<!-- $$$fromRgba64[overload1]$$$fromRgba64quint64 -->
<h3 class="fn" id="fromRgba64"><a name="fromRgba64"></a><code>[static] </code><span class="type">QRgba64</span> QRgba64::<span class="name">fromRgba64</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint64-typedef">quint64</a></span> <i>c</i>)</h3>
<p>Returns <i>c</i> as a <a href="qrgba64.html">QRgba64</a> struct.</p>
<p><b>See also </b><a href="qrgba64.html#fromArgb32">fromArgb32</a>().</p>
<!-- @@@fromRgba64 -->
<!-- $$$fromRgba64$$$fromRgba64quint16quint16quint16quint16 -->
<h3 class="fn" id="fromRgba64-1"><a name="fromRgba64-1"></a><code>[static] </code><span class="type">QRgba64</span> QRgba64::<span class="name">fromRgba64</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>r</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>g</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>b</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>a</i>)</h3>
<p>Returns the <a href="qrgba64.html">QRgba64</a> quadruplet (<i>r</i>, <i>g</i>, <i>b</i>, <i>a</i>).</p>
<p><b>See also </b><a href="qrgba64.html#fromRgba">fromRgba</a>().</p>
<!-- @@@fromRgba64 -->
<!-- $$$fromRgba[overload1]$$$fromRgbaquint8quint8quint8quint8 -->
<h3 class="fn" id="fromRgba"><a name="fromRgba"></a><code>[static] </code><span class="type">QRgba64</span> QRgba64::<span class="name">fromRgba</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> <i>red</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> <i>green</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> <i>blue</i>, <span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> <i>alpha</i>)</h3>
<p>Constructs a <a href="qrgba64.html">QRgba64</a> value from the four 8-bit color channels <i>red</i>, <i>green</i>, <i>blue</i> and <i>alpha</i>.</p>
<p><b>See also </b><a href="qrgba64.html#fromArgb32">fromArgb32</a>().</p>
<!-- @@@fromRgba -->
<!-- $$$green8[overload1]$$$green8 -->
<h3 class="fn" id="green8"><a name="green8"></a><span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> QRgba64::<span class="name">green8</span>() const</h3>
<p>Returns the green color component as an 8-bit.</p>
<!-- @@@green8 -->
<!-- $$$green[overload1]$$$green -->
<h3 class="fn" id="green"><a name="green"></a><span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> QRgba64::<span class="name">green</span>() const</h3>
<p>Returns the 16-bit green color component.</p>
<p><b>See also </b><a href="qrgba64.html#setGreen">setGreen</a>().</p>
<!-- @@@green -->
<!-- $$$isOpaque[overload1]$$$isOpaque -->
<h3 class="fn" id="isOpaque"><a name="isOpaque"></a><span class="type">bool</span> QRgba64::<span class="name">isOpaque</span>() const</h3>
<p>Returns whether the color is fully opaque.</p>
<p><b>See also </b><a href="qrgba64.html#isTransparent">isTransparent</a>() and <a href="qrgba64.html#alpha">alpha</a>().</p>
<!-- @@@isOpaque -->
<!-- $$$isTransparent[overload1]$$$isTransparent -->
<h3 class="fn" id="isTransparent"><a name="isTransparent"></a><span class="type">bool</span> QRgba64::<span class="name">isTransparent</span>() const</h3>
<p>Returns whether the color is transparent.</p>
<p><b>See also </b><a href="qrgba64.html#isOpaque">isOpaque</a>() and <a href="qrgba64.html#alpha">alpha</a>().</p>
<!-- @@@isTransparent -->
<!-- $$$premultiplied[overload1]$$$premultiplied -->
<h3 class="fn" id="premultiplied"><a name="premultiplied"></a><span class="type">QRgba64</span> QRgba64::<span class="name">premultiplied</span>() const</h3>
<p>Returns the color with the alpha premultiplied.</p>
<p><b>See also </b><a href="qrgba64.html#unpremultiplied">unpremultiplied</a>().</p>
<!-- @@@premultiplied -->
<!-- $$$red8[overload1]$$$red8 -->
<h3 class="fn" id="red8"><a name="red8"></a><span class="type"><a href="../qtcore/qtglobal.html#quint8-typedef">quint8</a></span> QRgba64::<span class="name">red8</span>() const</h3>
<p>Returns the red color component as an 8-bit.</p>
<!-- @@@red8 -->
<!-- $$$red[overload1]$$$red -->
<h3 class="fn" id="red"><a name="red"></a><span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> QRgba64::<span class="name">red</span>() const</h3>
<p>Returns the 16-bit red color component.</p>
<p><b>See also </b><a href="qrgba64.html#setRed">setRed</a>().</p>
<!-- @@@red -->
<!-- $$$setAlpha[overload1]$$$setAlphaquint16 -->
<h3 class="fn" id="setAlpha"><a name="setAlpha"></a><span class="type">void</span> QRgba64::<span class="name">setAlpha</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>alpha</i>)</h3>
<p>Sets the alpha of this color to <i>alpha</i>.</p>
<p><b>See also </b><a href="qrgba64.html#alpha">alpha</a>().</p>
<!-- @@@setAlpha -->
<!-- $$$setBlue[overload1]$$$setBluequint16 -->
<h3 class="fn" id="setBlue"><a name="setBlue"></a><span class="type">void</span> QRgba64::<span class="name">setBlue</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>blue</i>)</h3>
<p>Sets the blue color component of this color to <i>blue</i>.</p>
<p><b>See also </b><a href="qrgba64.html#blue">blue</a>().</p>
<!-- @@@setBlue -->
<!-- $$$setGreen[overload1]$$$setGreenquint16 -->
<h3 class="fn" id="setGreen"><a name="setGreen"></a><span class="type">void</span> QRgba64::<span class="name">setGreen</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>green</i>)</h3>
<p>Sets the green color component of this color to <i>green</i>.</p>
<p><b>See also </b><a href="qrgba64.html#green">green</a>().</p>
<!-- @@@setGreen -->
<!-- $$$setRed[overload1]$$$setRedquint16 -->
<h3 class="fn" id="setRed"><a name="setRed"></a><span class="type">void</span> QRgba64::<span class="name">setRed</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint16-typedef">quint16</a></span> <i>red</i>)</h3>
<p>Sets the red color component of this color to <i>red</i>.</p>
<p><b>See also </b><a href="qrgba64.html#red">red</a>().</p>
<!-- @@@setRed -->
<!-- $$$toArgb32[overload1]$$$toArgb32 -->
<h3 class="fn" id="toArgb32"><a name="toArgb32"></a><span class="type"><a href="../qtcore/qtglobal.html#uint-typedef">uint</a></span> QRgba64::<span class="name">toArgb32</span>() const</h3>
<p>Returns the color as a 32-bit ARGB value.</p>
<p><b>See also </b><a href="qrgba64.html#fromArgb32">fromArgb32</a>().</p>
<!-- @@@toArgb32 -->
<!-- $$$toRgb16[overload1]$$$toRgb16 -->
<h3 class="fn" id="toRgb16"><a name="toRgb16"></a><span class="type"><a href="../qtcore/qtglobal.html#ushort-typedef">ushort</a></span> QRgba64::<span class="name">toRgb16</span>() const</h3>
<p>Returns the color as a 16-bit RGB value.</p>
<p><b>See also </b><a href="qrgba64.html#toArgb32">toArgb32</a>().</p>
<!-- @@@toRgb16 -->
<!-- $$$unpremultiplied[overload1]$$$unpremultiplied -->
<h3 class="fn" id="unpremultiplied"><a name="unpremultiplied"></a><span class="type">QRgba64</span> QRgba64::<span class="name">unpremultiplied</span>() const</h3>
<p>Returns the color with the alpha unpremultiplied.</p>
<p><b>See also </b><a href="qrgba64.html#premultiplied">premultiplied</a>().</p>
<!-- @@@unpremultiplied -->
<!-- $$$operator quint64[overload1]$$$operator quint64 -->
<h3 class="fn" id="operator-quint64"><a name="operator-quint64"></a><span class="type"><a href="../qtcore/qtglobal.html#quint64-typedef">quint64</a></span> QRgba64::<span class="name">operator quint64</span>() const</h3>
<p>Returns the color as a 64bit unsigned integer</p>
<!-- @@@operator quint64 -->
<!-- $$$operator=[overload1]$$$operator=quint64 -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type">QRgba64</span> QRgba64::<span class="name">operator=</span>(<span class="type"><a href="../qtcore/qtglobal.html#quint64-typedef">quint64</a></span> <i>rgba</i>)</h3>
<p>Assigns the value <i>rgba</i> to this instance of <a href="qrgba64.html">QRgba64</a> and returns it.</p>
<!-- @@@operator= -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2020 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>
